<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" href="static/img/logo.png" type="image/png">
    <link rel="stylesheet" href="static/css/auth.css">
    <title>用户登录 - 智慧答题系统</title>
</head>
<body>
    <div class="auth-container">
        <div class="auth-card">
            <div class="auth-header">
                <div class="logo">
                    <img src="static/img/logo.png" alt="Logo">
                    <h2>智慧答题</h2>
                </div>
                <h1>欢迎回来</h1>
                <p>登录您的账号继续学习</p>
            </div>

            <form class="auth-form" id="loginForm">
                <!-- 成功提示 -->
                <div class="success-message" id="successMessage" style="display: none;"></div>
                
                <!-- 错误提示 -->
                <div class="error-banner" id="errorBanner" style="display: none;">
                    <span class="error-icon">⚠️</span>
                    <span id="errorText"></span>
                </div>
                
                <div class="form-group">
                    <label for="username">用户名</label>
                    <input type="text" id="username" name="username" required placeholder="请输入用户名">
                    <span class="error-message" id="usernameError"></span>
                </div>

                <div class="form-group">
                    <label for="password">密码</label>
                    <input type="password" id="password" name="password" required placeholder="请输入密码">
                    <span class="error-message" id="passwordError"></span>
                </div>

                <div class="form-options">
                    <label class="checkbox-label">
                        <input type="checkbox" id="remember">
                        <span>记住我</span>
                    </label>
                    <a href="#" class="forgot-link">忘记密码？</a>
                </div>

                <button type="submit" class="btn-primary" id="loginBtn">
                    <span>登录</span>
                    <span class="btn-loading" style="display:none;">登录中...</span>
                </button>

                <div class="auth-footer">
                    <p>还没有账号？<a href="/register">立即注册</a></p>
                    <p><a href="/">返回首页</a></p>
                </div>
            </form>

            <div class="social-login">
                <div class="divider">
                    <span>或者</span>
                </div>
                <div class="social-buttons">
                    <button class="social-btn wechat">
                        <span class="social-icon">💬</span>
                        <span>微信登录</span>
                    </button>
                    <button class="social-btn qq">
                        <span class="social-icon">🐧</span>
                        <span>QQ登录</span>
                    </button>
                </div>
            </div>
        </div>
    </div>

    <script src="static/js/auth.js"></script>
</body>
</html>

